﻿using System;
using System.Runtime.InteropServices;

namespace AudioSwitch.CoreAudioApi.Interfaces
{
    namespace CoreAudioApi.Interfaces
    {
        [Guid("f8679f50-850a-41cf-9c72-430f290290c8"),
        InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
        internal interface IPolicyConfig
        {
            [PreserveSig]
            int GetMixFormat(string pszDeviceName, IntPtr ppFormat);

            [PreserveSig]
            int GetDeviceFormat(string pszDeviceName, bool bDefault, IntPtr ppFormat);

            [PreserveSig]
            int ResetDeviceFormat(string pszDeviceName);

            [PreserveSig]
            int SetDeviceFormat(string pszDeviceName, IntPtr pEndpointFormat, IntPtr MixFormat);

            [PreserveSig]
            int GetProcessingPeriod(string pszDeviceName, bool bDefault, IntPtr pmftDefaultPeriod, IntPtr pmftMinimumPeriod);

            [PreserveSig]
            int SetProcessingPeriod(string pszDeviceName, IntPtr pmftPeriod);

            [PreserveSig]
            int GetShareMode(string pszDeviceName, IntPtr pMode);

            [PreserveSig]
            int SetShareMode(string pszDeviceName, IntPtr mode);

            [PreserveSig]
            int GetPropertyValue(string pszDeviceName, bool bFxStore, IntPtr key, IntPtr pv);

            [PreserveSig]
            int SetPropertyValue(string pszDeviceName, bool bFxStore, IntPtr key, IntPtr pv);

            [PreserveSig]
            int SetDefaultEndpoint(string pszDeviceName, ERole role);

            [PreserveSig]
            int SetEndpointVisibility(string pszDeviceName, bool bVisible);
        }
    }
}
